﻿namespace Channelvn.Cached.Common
{
    public class Constants
    {

        public const string CACHE_NAME_FORMAT_HTML_PAGE_CONTENT = "PageCachedContent[Cat:{0}_News:{1}_Thread:{2}_Page:{3}_DateSearch:{4}]";

        public const string KEY_VERSION = "KEY_VERSION";

        public const string CACHE_NAME_FORMAT_HTML_CONTROL_CONTENT = "ControlCachedContent[{0}][Cat:{1}_News:{2}_Page:{3}]";
        /// <summary>
        /// ControlCachedContent[Top10LastestNewsInCat:{category}]
        /// </summary>
        public const string CACHE_NAME_TOP_LASTEST_NEW_ID = "ControlCachedContent[TopLastestNewsInCat:{0}]";

        public const string CACHE_NAME_TOP_NEWS_ID = "TOP_NEWS_ID_{0}";
        /// <summary>
        /// {key}_LastUpdate
        /// </summary>
        public const string CACHE_NAME_LAST_UPDATE = "{0}_LastUpdate";
        /// <summary>
        /// {NewsID}_NewsDetail_Category
        /// </summary>
        public const string CACHE_NAME_NEWS_DETAIL_CATEGORY = "{0}_NewsDetail_Category";
        /// <summary>
        /// {NewsID}_NewsDetail_Title
        /// </summary>
        public const string CACHE_NAME_NEWS_DETAIL_TITLE = "{0}_NewsDetail_Title";
        /// <summary>
        /// {NewsID}_NewsDetail_Sapo
        /// </summary>
        public const string CACHE_NAME_NEWS_DETAIL_SAPO = "{0}_NewsDetail_Sapo";
        /// <summary>
        /// {NewsID}_NewsDetail_LogScript
        /// </summary>
        public const string CACHE_NAME_NEWS_DETAIL_LOG_SCRIPT = "{0}_NewsDetail_LogScript";
        /// <summary>
        /// DataCached_{CacheName}
        /// </summary>
        public const string CACHE_NAME_FORMAT_DATA_CACHE = "DataCached_{0}";

        #region Special parent category
        /// <summary>
        /// Parent Category sử dụng cho các control trong trang News Detail 
        /// </summary>
        public const string PARENT_CATEGORY_FOR_NEWS_DETAIL_CACHE = "details";
        /// <summary>
        /// Parent Category sử dụng cho Data cache
        /// </summary>
        public const string PARENT_CATEGORY_FOR_DATA_CACHE = "control";
        /// <summary>
        /// Parent Category sử dụng cho Homepage
        /// </summary>
        public const string PARENT_CATEGORY_FOR_HOME_PAGE_CACHE = "0";
        /// <summary>
        /// Dòng sự kiện
        /// </summary>
        public const string PARENT_CATEGORY_FOR_THREAD_PAGE_CACHE = "dsk";
        #endregion
    }
}
